Style
Overview
The Visual's styles. Used to access the styles object and its theme configurations for styling the custom visual.
- From version: 2020.20
Properties
backgroundColor
backgroundColor: string
Background Color that was defined for the visual in the chosen theme.
fontColor
fontColor: string
Font color that was defined for the visual in the chosen theme.
fontFamily
fontFamily: string
Font family that was defined for the visual in the chosen theme.
fontSize
fontSize: string
Font size that was defined for the visual in the chosen theme.
fontStyle
fontStyle: string
Font style that was defined for the visual in the chosen theme.
fontWeight
fontWeight: string
Font weight that was defined for the visual in the chosen theme.
lineColor
lineColor: string
Line color that was defined for the visual in the chosen theme.
pyramidThemeStyle
pyramidThemeStyle: IStyleData
The internal theme style object. Contains all theme styling properties as defined in Pyramid's theme editor. Use this to access all the (deep) styling properties that are not accessible from the API's simpler (and direct) style objects and properties.
themeBackgroundColor
themeBackgroundColor: string
Theme background Color that was defined for the visual in the chosen theme.
Methods
getRangeColors
getRangeColors ( colorRangeType : ColorRangeType ): string[]
A function for getting range of colors that have a representation in the theme. Can be used for coloring bands or indicate between chronological phases. It is useful when styling the visual with the user's chosen theme.
Parameters
-
colorRangeType:ColorRangeType
An enum that represent the type of color range that is needed.
Returns string[]
Range of colors that have a representation in the theme.
getThemeColorByIndex
getThemeColorByIndex ( index : number): string
A function to return one of the 16 core theme colors. It is useful when styling the visual with the user's chosen theme.
Parameters
Returns string
Represent the selected color.